package org.exercise10.visitor;

import java.util.List;

/**
 * @author Stranger
 * @version 1.0
 * @description: TODO
 * @date 2022/12/20 19:27
 */
public class Company {
    private List<Element> elementList;

    public Company(List<Element> elementList) {
        this.elementList = elementList;
    }

    public void access(Visitor visitor) {
        elementList.forEach(element -> element.access(visitor));
    }
}
